package com.ac.scum.log.task.clear;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ClearTaskUtilsMapper {

 /*   @Select("select table_name from mysql.innodb_table_stats where database_name='scum_log' and table_name like 'server_ftp_file_log_%'")
    List<String> needClearTable();*/

    @Delete("delete from ${tableName} where create_time < (SELECT DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 MONTH))")
    void clearAMonthLogByTable(@Param("tableName") String tableName);
}
